package com.hzeport.bgs22emduty.enums;

import com.masa.common.core.utils.string.StringUtils;

public enum IsDutyEnum {
    // 是否提醒值班员
    IS("1","提醒"),
    NO("0","不提醒");


    private String code;
    private String description;

    public String getCode() {
        return code;
    }

    public void setCode( String code ) {
        this.code = code;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription( String description ) {
        this.description = description;
    }

    IsDutyEnum() {
    }

    IsDutyEnum( String code , String description ) {
        this.code = code;
        this.description = description;
    }

    public static String getDescByCode(String code) {
        if ( StringUtils.isNotEmpty(code)) {
            for ( SmsEnum myEnum : SmsEnum.values()) {
                if (StringUtils.equals(myEnum.getCode(), code)) {
                    return myEnum.getDescription();
                }
            }
        }
        return "";
    }

}
